"use strict";
cc._RF.push(module, 'a2006DvmbJDmpkqSEI0ejdU', 'role_node');
// scripts/role_node.js

"use strict";

var e = require;
var t = module;
var o = exports;

var _ii,
    nn = void 0 && (void 0).__extends || (_ii = function ii(t, e) {
  return (_ii = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _ii(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    rr = void 0 && (void 0).__awaiter || function (t, e, o, i) {
  return new (o || (o = Promise))(function (n, a) {
    function r(t) {
      try {
        l(i.next(t));
      } catch (e) {
        a(e);
      }
    }

    function s(t) {
      try {
        l(i["throw"](t));
      } catch (e) {
        a(e);
      }
    }

    function l(t) {
      var e;
      t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
        t(e);
      })).then(r, s);
    }

    l((i = i.apply(t, e || [])).next());
  });
};

var oo = void 0 && (void 0).__decorate || function (e, t, a, n) {
  var i,
      o = arguments.length,
      s = o < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, a) : n;
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(e, t, a, n);else for (var r = e.length - 1; r >= 0; r--) {
    (i = e[r]) && (s = (o < 3 ? i(s) : o > 3 ? i(t, a, s) : i(t, a)) || s);
  }
  return o > 3 && s && Object.defineProperty(t, a, s), s;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});

var a = e("BaseModuleUI"),
    n = e("NotifyEventType"),
    i = e("GlobalParams"),
    r = e("AudioManager"),
    s = e("CommonHelper"),
    l = e("PureHelper"),
    _ = e("Game"),
    c = e("ObjectPool"),
    d = e("RoleSoldierInfo"),
    h = e("AI_node"),
    u = e("node_team"),
    p = e("player_info_node"),
    m = e("player_node"),
    f = e("role_effects_info"),
    v = e("role_skill"),
    g = e("role_sound"),
    y = cc._decorator,
    I = y.ccclass,
    w = y.property,
    b = function (e) {
  function t() {
    var t = null !== e && e.apply(this, arguments) || this;
    return t.role_skin = null, t.be_hit_skin = null, t.role_move = !1, t.moveDir = new cc.Vec2(0, 0), t.role_info = null, t.is_AI = !1, t.role_skill = null, t.role_attack = !1, t.player_info_node = null, t.player_info = null, t.match_game_index = 0, t.skill_one_time = 0, t.skill_two_time = 0, t.skill_three_time = 0, t.home_pos = null, t.add_heal = null, t.reduce_attack = !1, t.role_death = !1, t.have_blue_buff = !1, t.have_red_buff = !1, t.have_drager_buff = !1, t.one_double = !1, t.two_doubel = !1, t.for_speed = 0, t.role_sound = null, t.is_god = !1, t.is_flash = !1, t.player_flash_move = !1, t.is_battle = !1, t;
  }

  var o;
  return nn(t, e), o = t, t.prototype.showRoleInfo = function (e, t, o) {
    void 0 === o && (o = !1), this.is_AI = e, this.role_death = !1, this.node.getComponent(m["default"]).enabled = !this.is_AI, this.node.getComponent(h["default"]).enabled = this.is_AI, this.node.getComponent(h["default"]).showAIRoadInfo(t), this.match_game_index = t, this.player_info = i.GlobalParams.MatchGamePlayer[t], this.role_info = d["default"].Role_info[this.player_info.role_id], this.role_sound = this.node.getComponent(g["default"]), this.is_battle = o;
  }, t.prototype.setPlayerInfoNode = function (e) {
    this.player_info_node = e, this.player_info_node.getComponent(p["default"]).InfoInit(this.match_game_index, this.node), this.is_god = !1, this.is_flash = !0;
  }, t.prototype.initView = function () {
    var e = this;
    this.role_skin.node.zIndex = 4, this.be_hit_skin.node.active = !1, this.home_pos = this.node.getPosition(), this.add_heal = c["default"].getInstance().creatPlane(_.Pool_Type.role_effects), this.add_heal.active = !1, this.add_heal.setParent(this.node), this.role_skill = this.node.getComponent(v["default"]), this.playRoleAnimation("battle_idle", !0), this.updateTime(), this.is_AI || this.emitEvent(n["default"].SEND_PLAYER_POS_INFO, this.node), this.emitEvent(n["default"].SEND_ROLE_SMALL_HEAD_POS, {
      index: this.match_game_index,
      pos: this.node.getPosition()
    }), this.role_skin.setCompleteListener(function (t, o) {
      e.roleSkinCompleteListener(t, o);
    }), 2 != i.GlobalParams.MultiModeIndex || i.GlobalParams.GameStart || this.heroStartMove();
  }, t.prototype.heroStartMove = function () {
    var e = this;
    this.playRoleAnimation("run", !0);
    var t = this.node.getPosition();
    this.is_battle ? t.x += this.node.scaleX > 0 ? -200 : 200 : t.x = i.GlobalParams.MatchMyIndex == this.match_game_index ? 25 : -25, cc.tween(this.node).to(1, {
      position: cc.v2(t.x, t.y)
    }).call(function () {
      e.playRoleAnimation("battle_idle", !0);
    }).start(), this.role_move = !1, this.role_attack = !1;
  }, t.prototype.addEvent = function () {
    this.attachEvent(n["default"].SEND_GAME_OVER_INFO, this.gameOverAnime, this), this.attachEvent(n["default"].SEND_ROLE_ADD_BIG_DRAGON_BUFF, this.showRoleBeKill, this), this.attachEvent(n["default"].SEND_PLAYER_CHOOSE_OPERATE_HERO_INDEX, this.updateOperateHero, this);
  }, t.prototype.updateOperateHero = function () {
    this.is_AI = this.match_game_index != i.GlobalParams.MatchMyIndex, this.node.getComponent(m["default"]).enabled = !this.is_AI, this.node.getComponent(h["default"]).enabled = this.is_AI, this.is_AI || (this.emitEvent(n["default"].SEND_PLAYER_SKILL_COOLING_TIME, {
      type: 1,
      time: this.skill_one_time
    }), this.emitEvent(n["default"].SEND_PLAYER_SKILL_COOLING_TIME, {
      type: 2,
      time: this.skill_two_time
    }), this.emitEvent(n["default"].SEND_PLAYER_SKILL_COOLING_TIME, {
      type: 3,
      time: this.skill_three_time
    }), this.addRoleEffects(_.RoleEffectType.Operate));
  }, t.prototype.showRoleBeKill = function (e, t) {
    t % 2 == this.match_game_index % 2 && this.addRoleEffects(_.RoleEffectType.dragon_buff);
  }, t.prototype.gameOverAnime = function () {
    this.match_game_index % 2 == i.GlobalParams.MatchMyIndex % 2 ? this.playRoleAnimation(i.GlobalParams.GamePlayerWin ? "dance" : "battle_idle", !0) : this.playRoleAnimation(i.GlobalParams.GamePlayerWin ? "battle_idle" : "dance", !0);
  }, t.prototype.updateTime = function () {
    var e = this;
    !i.GlobalParams.GameStart || this.role_death || this.player_flash_move || (this.role_move && !this.role_attack && this.roleMove(), this.is_AI || 2 == i.GlobalParams.MultiModeIndex || (Math.abs(this.node.getPosition().x - this.home_pos.x) <= 180 && this.player_info_node.getComponent(p["default"]).getHpNotFull() ? (this.add_heal.active || (this.add_heal.active = !0, this.add_heal.getComponent(f["default"]).showEffectInfo(_.RoleEffectType.home_heal)), this.setRoleAddHp()) : this.add_heal.active = !1)), !i.GlobalParams.GameStart && this.role_move && (this.role_move = !1, this.playRoleAnimation("battle_idle", !0)), this.scheduleOnce(function () {
      e.updateTime();
    }, i.GlobalParams.GameUpdateTime);
  }, t.prototype.roleMoveInfo = function (e) {
    i.GlobalParams.GameStart && (this.moveDir = e, this.role_move || this.role_attack || (this.role_move = !0, this.playRoleAnimation("run", !0)));
  }, t.prototype.roleStopMove = function () {
    this.role_move && !this.role_attack && (this.heroFlashOver(), this.node.stopAllActions(), this.playRoleAnimation("battle_idle", !0)), this.moveDir = cc.v2(0, 0), this.role_move = !1;
  }, t.prototype.roleCommonSkill = function () {
    this.role_death || this.roleSkillAnime("attack");
  }, t.prototype.roleSpecialSkillOne = function () {
    this.skill_one_time <= 0 && (this.role_attack && "attack" == this.role_skin.animation && (this.role_attack = !1), this.one_double || -1 == i.GlobalParams.MatchGamePlayer[this.match_game_index].equip_info.indexOf(15) || (this.one_double = !0), this.roleSkillAnime("attack_skill_1"));
  }, t.prototype.roleSpecialSkillTwo = function () {
    this.skill_two_time <= 0 && (this.role_attack && "attack" == this.role_skin.animation && (this.role_attack = !1), this.two_doubel || -1 == i.GlobalParams.MatchGamePlayer[this.match_game_index].equip_info.indexOf(29) || (this.two_doubel = !0), this.roleSkillAnime("attack_skill_2"));
  }, t.prototype.roleSpecialSkillThree = function () {
    this.skill_three_time <= 0 && (this.role_attack && "attack" == this.role_skin.animation && (this.role_attack = !1), this.roleSkillAnime("attack_skill_3"));
  }, t.prototype.AISpecialSkill = function () {
    this.skill_one_time <= 0 && this.player_info.skill_info[0] > 0 ? this.roleSpecialSkillOne() : this.skill_two_time <= 0 && this.player_info.skill_info[1] > 0 ? this.roleSpecialSkillTwo() : this.skill_three_time <= 0 && this.player_info.skill_info[2] > 0 ? this.roleSpecialSkillThree() : this.roleCommonSkill();
  }, t.prototype.roleSkillAnime = function (e) {
    var t = this;

    if (!this.role_attack && !this.role_death) {
      "attack_skill_1" == e ? this.role_sound.playSkillOne() : "attack_skill_2" == e ? this.role_sound.playSkillTow() : "attack_skill_3" == e ? this.role_sound.playSkillThree() : this.role_sound.playAttack(), this.role_attack = !0;
      var o = this.role_skin.setAnimation(0, e, !0),
          a = i.GlobalParams.GamePlayerInfo[this.match_game_index].attack_speed - i.GlobalParams.BuyEquipInfo[this.match_game_index].attack_speed;
      i.GlobalParams.ChangeGameMode == _.GameType.endless_mode && (a = 0.5), a = a < 0.6 ? 0.6 : a, this.role_skin.timeScale = a, this.role_skin.setTrackEventListener(o, function (o, a) {
        if ("move" == a.data.name) t.role_attack = !1, t.role_move && (t.is_god = !1, t.playRoleAnimation("run", !0)), t.skillCoolingTime(e);else {
          if (5 == t.role_info.id && "attack_skill_2" == e && "role_displace" == a.data.name) {
            t.is_god = !0;
            var r = t.node.getPosition().add(cc.v2(t.node.scaleX > 0 ? -1 : 1, 0).mul(t.is_flash ? 400 : 0));
            cc.tween(t.node).to(0.01, {
              opacity: 0
            }).to(2 * i.GlobalParams.GameUpdateTime, {
              position: cc.v2(r.x, r.y),
              opacity: 255
            }).call(function () {
              t.emitEvent(n["default"].SEND_ROLE_SMALL_HEAD_POS, {
                index: t.match_game_index,
                pos: t.node.getPosition()
              });
            }).start();
          }

          t.role_skill.roleCommonSkill(!1, e), t.role_skill.roleCommonSkill(!0, e), t.role_skin.timeScale = 1;
        }
      });
    }
  }, t.prototype.roleSkinCompleteListener = function (e) {
    var t = e.animation ? e.animation.name : "";
    -1 != ["attack", "attack_skill_1", "attack_skill_2", "attack_skill_3"].indexOf(t) && (this.role_skill.roleCommonSkill(!1, t), this.role_skin.clearTracks(), this.is_god = !1, this.role_move ? (this.role_attack = !1, this.playRoleAnimation("run", !0)) : (this.role_attack = !1, this.playRoleAnimation("battle_idle", !0)), this.skillCoolingTime(t)), "death" == t && this.node.destroy();
  }, t.prototype.roleMove = function () {
    var e = this;
    0 != this.moveDir.x && (this.node.scaleX = Math.abs(this.node.scaleX) * (this.moveDir.x < 0 ? 1 : -1));
    var t = i.GlobalParams.GamePlayerInfo[this.match_game_index].move_speed + i.GlobalParams.BuyEquipInfo[this.match_game_index].move_speed;
    this.for_speed > 0 && (t = Math.ceil(t * (1 - this.for_speed / 100)));
    var o = this.node.getPosition().add(this.moveDir.mul(this.is_flash ? t : 20));
    cc.tween(this.node).to(i.GlobalParams.GameUpdateTime, {
      position: cc.v2(o.x, o.y)
    }).call(function () {
      e.emitEvent(n["default"].SEND_ROLE_SMALL_HEAD_POS, {
        index: e.match_game_index,
        pos: e.node.getPosition()
      });
    }).start(), this.match_game_index == i.GlobalParams.MatchMyIndex && this.role_sound.playRun();
  }, t.prototype.attackMove = function () {
    var e = this;
    this.moveDir = cc.v2(this.node.scaleX < 0 ? 1 : -1, 0);
    var t = this.node.getPosition().add(this.moveDir.mul(15));
    cc.tween(this.node).to(i.GlobalParams.GameUpdateTime, {
      position: cc.v2(t.x, t.y)
    }).call(function () {
      e.emitEvent(n["default"].SEND_ROLE_SMALL_HEAD_POS, {
        index: e.match_game_index,
        pos: e.node.getPosition()
      });
    }).start();
  }, t.prototype.getRoleSkillAttack = function (e) {
    var t = 0,
        o = i.GlobalParams.GamePlayerInfo[this.match_game_index];
    if (!this.player_info_node) return 0;

    switch (e) {
      case 1:
        if (t = o.attack, t += Math.ceil(t * (i.GlobalParams.BuyEquipInfo[this.match_game_index].add_attack / 100)), i.GlobalParams.BuyEquipInfo[this.match_game_index].attack_hp > 0 && cc.isValid(this.player_info_node, !0)) {
          var a = i.GlobalParams.BuyEquipInfo[this.match_game_index].attack_hp / 100;
          this.player_info_node.getComponent(p["default"]).roleSkillAddHp(a);
        }

        this.one_double ? (t += t, this.one_double = !1) : this.two_doubel && (t += 1.5 * t, this.two_doubel = !1);
        break;

      case 2:
        t = o.skill_1 + o.attack * this.role_info.S1_attack_add + i.GlobalParams.BuyEquipInfo[this.match_game_index].skill_1, t += Math.ceil(t * (i.GlobalParams.BuyEquipInfo[this.match_game_index].skill_add / 100));
        break;

      case 3:
        t = o.skill_2 + o.attack * this.role_info.S2_attack_add + i.GlobalParams.BuyEquipInfo[this.match_game_index].skill_2, t += Math.ceil(t * (i.GlobalParams.BuyEquipInfo[this.match_game_index].skill_add / 100));
        break;

      case 4:
        t = o.skill_3 + o.attack * this.role_info.S3_attack_add + i.GlobalParams.BuyEquipInfo[this.match_game_index].skill_3, t += Math.ceil(t * (i.GlobalParams.BuyEquipInfo[this.match_game_index].skill_add / 100));
    }

    if (i.GlobalParams.BuyEquipInfo[this.match_game_index].suck_blood > 0 && cc.isValid(this.player_info_node, !0)) {
      var n = Math.ceil(t * (i.GlobalParams.BuyEquipInfo[this.match_game_index].suck_blood / 100));
      this.player_info_node.getComponent(p["default"]).setRoleAddHp(n);
    }

    return t += i.GlobalParams.BuyEquipInfo[this.match_game_index].attack, this.reduce_attack && (t *= 0.5), this.have_red_buff && (t += 0.1 * t), s["default"].getRandomInt(1, 100) <= i.GlobalParams.BuyEquipInfo[this.match_game_index].crit && (t *= 2), t.toFixed();
  }, t.prototype.showRoleDeath = function () {
    this.role_death = !0, this.heroFlashOver(), this.node.stopAllActions(), this.role_sound.playDie(), this.addRoleEffects(_.RoleEffectType.hero_die), r["default"].getInstance().playFx("hero_die"), this.playRoleAnimation("death", !1);
  }, t.prototype.getRoleHpPercent = function () {
    return this.player_info_node.getComponent(p["default"]).getRoleHpPercent();
  }, t.prototype.setRoleAddHp = function () {
    this.player_info_node.getComponent(p["default"]).setRoleAddHp(s["default"].getRandomInt(40, 70) * i.GlobalParams.MatchGamePlayer[this.match_game_index].level);
  }, t.prototype.roleSkillAddHp = function (e) {
    this.player_info_node.getComponent(p["default"]).roleSkillAddHp(e);
  }, t.prototype.roleBeHit = function (e, t) {
    var o = this;

    if (!this.is_god && !this.role_death) {
      this.have_drager_buff && (e = Math.floor(0.5 * e));
      var a = i.GlobalParams.BuyEquipInfo[this.match_game_index].be_hit;
      a = a > 50 ? 50 : a, e = Math.ceil(e * (1 - a / 100)), this.player_info_node.getComponent(p["default"]).roleBeHit(e, t), this.be_hit_skin.node.active = !0, this.be_hit_skin.setAnimation(0, "受击特效", !1), this.role_sound.plyerBeHit(), this.be_hit_skin.setCompleteListener(function () {
        o.be_hit_skin.node.active = !1;
      }), this.is_AI && 10 == t && this.node.getComponent(h["default"]).moveTowerRange();
    }
  }, t.prototype.skillCoolingTime = function (e) {
    var t = this;
    "attack_skill_1" == e ? (this.skill_one_time = i.GlobalParams.GamePlayerInfo[this.match_game_index].cool_1 - i.GlobalParams.BuyEquipInfo[this.match_game_index].cool_1, this.have_blue_buff && (this.skill_one_time -= Math.ceil(0.1 * this.skill_one_time)), this.skill_one_time = this.skill_one_time < 3 ? 3 : this.skill_one_time, this.skill_one_time = Number(this.skill_one_time.toFixed(1)), i.GlobalParams.ChangeGameMode == _.GameType.endless_mode && (this.skill_one_time = 1), this.scheduleOnce(function () {
      t.skill_one_time = 0;
    }, this.skill_one_time), this.is_AI || this.emitEvent(n["default"].SEND_PLAYER_SKILL_COOLING_TIME, {
      type: 1,
      time: this.skill_one_time
    })) : "attack_skill_2" == e ? (this.skill_two_time = i.GlobalParams.GamePlayerInfo[this.match_game_index].cool_2 - i.GlobalParams.BuyEquipInfo[this.match_game_index].cool_2, this.have_blue_buff && (this.skill_two_time -= Math.ceil(0.1 * this.skill_two_time)), this.skill_two_time = this.skill_two_time < 5 ? 5 : this.skill_two_time, this.skill_two_time = Number(this.skill_two_time.toFixed(1)), i.GlobalParams.ChangeGameMode == _.GameType.endless_mode && (this.skill_two_time = 4), this.scheduleOnce(function () {
      t.skill_two_time = 0;
    }, this.skill_two_time), this.is_AI || this.emitEvent(n["default"].SEND_PLAYER_SKILL_COOLING_TIME, {
      type: 2,
      time: this.skill_two_time
    })) : "attack_skill_3" == e && (this.skill_three_time = i.GlobalParams.GamePlayerInfo[this.match_game_index].cool_3 - i.GlobalParams.BuyEquipInfo[this.match_game_index].cool_3, this.have_blue_buff && (this.skill_three_time -= Math.ceil(0.1 * this.skill_three_time)), this.skill_three_time = this.skill_three_time < 5 ? 5 : this.skill_three_time, this.skill_three_time = Number(this.skill_three_time.toFixed(1)), i.GlobalParams.ChangeGameMode == _.GameType.endless_mode && (this.skill_three_time = 4), this.scheduleOnce(function () {
      t.skill_three_time = 0;
    }, this.skill_three_time), this.is_AI || this.emitEvent(n["default"].SEND_PLAYER_SKILL_COOLING_TIME, {
      type: 3,
      time: this.skill_three_time
    }));
  }, t.prototype.showSprintSkill = function () {
    var e = this;
    i.GlobalParams.GamePlayerInfo[this.match_game_index].move_speed += 20, this.addRoleEffects(_.RoleEffectType.sprint), this.scheduleOnce(function () {
      i.GlobalParams.GamePlayerInfo[e.match_game_index].move_speed -= 20;
    }, 5), this.emitEvent(n["default"].SEND_PLAYER_USE_PLAYER_SKILL_OVER, {
      id: 1,
      cool: !0
    });
  }, t.prototype.showAddHpSkill = function () {
    this.player_info_node.getComponent(p["default"]).playerSkillAddHp(), this.addRoleEffects(_.RoleEffectType.heal), this.emitEvent(n["default"].SEND_PLAYER_USE_PLAYER_SKILL_OVER, {
      id: 2,
      cool: !0
    });
  }, t.prototype.showLightSkill = function () {
    var e = this.eachSoliderInfo(),
        t = !1;
    e && (e.getComponent(o).player_info_node.getComponent(p["default"]).playerBeLight(this.match_game_index), t = !0), this.emitEvent(n["default"].SEND_PLAYER_USE_PLAYER_SKILL_OVER, {
      id: 3,
      cool: t
    });
  }, t.prototype.showWeaknessSkill = function () {
    var e = this.eachSoliderInfo(),
        t = !1;
    e && (e.getComponent(o).beWeaknessHit(), e.getComponent(o).addRoleEffects(_.RoleEffectType.clock), t = !0), this.emitEvent(n["default"].SEND_PLAYER_USE_PLAYER_SKILL_OVER, {
      id: 4,
      cool: t
    });
  }, t.prototype.showKillSkill = function () {
    var e = this.eachSoliderInfo(),
        t = !1;
    e && (e.getComponent(o).player_info_node.getComponent(p["default"]).playerKillSkill(this.match_game_index), t = !0), this.emitEvent(n["default"].SEND_PLAYER_USE_PLAYER_SKILL_OVER, {
      id: 5,
      cool: t
    });
  }, t.prototype.showFlashSkill = function () {
    var e = this;
    this.player_flash_move = !0;
    var t = this.node.getPosition().add(this.moveDir.mul(this.is_flash ? 300 : 0));
    this.node.opacity = 0, cc.tween(this.node).to(i.GlobalParams.GameUpdateTime, {
      position: cc.v2(t.x, t.y)
    }).call(function () {
      e.heroFlashOver(), e.emitEvent(n["default"].SEND_ROLE_SMALL_HEAD_POS, {
        index: e.match_game_index,
        pos: e.node.getPosition()
      }), e.emitEvent(n["default"].SEND_PLAYER_USE_PLAYER_SKILL_OVER, {
        id: 6,
        cool: !0
      });
    }).start();
  }, t.prototype.heroFlashOver = function () {
    this.node.opacity = 255, this.player_flash_move = !1;
  }, t.prototype.beWeaknessHit = function () {
    var e = this;
    this.reduce_attack = !0, this.scheduleOnce(function () {
      e.reduce_attack = !1;
    }, 5);
  }, t.prototype.eachSoliderInfo = function () {
    for (var e = 9999, t = null, o = this.node.getComponent(u["default"]).getTeamInfo(), a = 0, n = this.node.parent.children; a < n.length; a++) {
      var i = n[a],
          r = i.getComponent(u["default"]).getTeamInfo();

      if (cc.isValid(i, !0) && "role" == i.group && r != o && r != _.TeamInfo.rest_team) {
        var s = Math.abs(l["default"].Distance(this.node.getPosition(), i.getPosition()));
        if (s > 400) continue;
        s < e && (e = s, t = i);
      }
    }

    return t;
  }, t.prototype.playRoleAnimation = function (e, t) {
    "death" != this.role_skin.animation && this.role_skin.setAnimation(0, e, t);
  }, t.prototype.addRoleEffects = function (e) {
    var t = this;
    e == _.RoleEffectType.red_buff ? (this.have_red_buff = !0, this.scheduleOnce(function () {
      t.have_red_buff = !1;
    }, 40)) : e == _.RoleEffectType.blue_buff ? (this.have_blue_buff = !0, this.scheduleOnce(function () {
      t.have_blue_buff = !1;
    }, 40)) : e == _.RoleEffectType.dragon_buff && (this.have_drager_buff = !0, this.scheduleOnce(function () {
      t.have_drager_buff = !1;
    }, 60));
    var o = c["default"].getInstance().creatPlane(_.Pool_Type.role_effects);
    o.setParent(this.node), o.getComponent(f["default"]).showEffectInfo(e);
  }, t.prototype.getEquipForSpeed = function () {
    return i.GlobalParams.BuyEquipInfo[this.match_game_index].for_speed;
  }, t.prototype.setForSpeed = function (e) {
    var t = this;
    0 == this.for_speed && (this.for_speed = e, this.scheduleOnce(function () {
      t.for_speed = 0;
    }, 5));
  }, oo([w(sp.Skeleton)], t.prototype, "role_skin", void 0), oo([w(sp.Skeleton)], t.prototype, "be_hit_skin", void 0), o = oo([I], t);
}(a["default"]);

o["default"] = b;

cc._RF.pop();